<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增【请填写功能名称】')" />
        <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-project-add">
           <div class="form-group">    
                <label class="col-sm-3 control-label">项目编号：</label>
                <div class="col-sm-8">
                    <input name="projectCode" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目名称：</label>
                <div class="col-sm-8">
                    <input name="projectName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">开始日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input id="clockdatetime" name="projectStart" class="form-control" placeholder="请选择日期" type="text" autocomplete="off" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
           <div class="form-group">    
                <label class="col-sm-3 control-label">结束日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input id="clockdatetime2" name="projectEnd" class="form-control" placeholder="请选择日期" type="text" autocomplete="off">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="projectStatus" value="0">
                        <label th:for="projectStatus" th:text="正常"></label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" name="projectStatus" value="1">
                        <label th:for="projectStatus" th:text="结束"></label>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
            <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/project"
        $("#form-project-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-project-add').serialize());
            }
        }
        
        $("#clockdatetime").datetimepicker({
            format: "yyyy-mm-dd",
            startView: 2,
            minView:2,
            maxView:3,
            autoclose: true
        });
        
        $("#clockdatetime2").datetimepicker({
            format: "yyyy-mm-dd",
            startView: 2,
            minView:2,
            maxView:3,
            autoclose: true
        });
    </script>
</body>
</html>